<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/Decider.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00291.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Decider.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode:c++ -*- ********************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> */</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef DECIDER_H_</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define DECIDER_H_</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;omnetpp.h&gt;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;MiXiMDefs.h&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;DeciderToPhyInterface.h&quot;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;ChannelSenseRequest_m.h&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;ChannelState.h&quot;</span>
<a name="l00016"></a>00016 
<a name="l00029"></a><a class="code" href="a00075.html">00029</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>
<a name="l00030"></a>00030 {
<a name="l00031"></a>00031 <span class="keyword">protected</span>:
<a name="l00033"></a><a class="code" href="a00075.html#a73068fc2669c331401e00fd985ced574">00033</a>   <span class="keywordtype">bool</span> <a class="code" href="a00075.html#a73068fc2669c331401e00fd985ced574">isCorrect</a>;
<a name="l00034"></a>00034 <span class="keyword">public</span>:
<a name="l00035"></a>00035   <span class="keyword">virtual</span> ~<a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>() {}
<a name="l00036"></a>00036 
<a name="l00041"></a><a class="code" href="a00075.html#a86937859a140dbe670d6fa3a2f6f839a">00041</a>   <a class="code" href="a00075.html" title="A class to represent the result of a processed packet (that is not noise) by the Decider.">DeciderResult</a>(<span class="keywordtype">bool</span> isCorrect = <span class="keyword">true</span>):
<a name="l00042"></a>00042     isCorrect(isCorrect) {}
<a name="l00043"></a>00043 
<a name="l00047"></a>00047    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isSignalCorrect() <span class="keyword">const</span>;
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 };
<a name="l00050"></a>00050 
<a name="l00064"></a><a class="code" href="a00070.html">00064</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>
<a name="l00065"></a>00065 {
<a name="l00066"></a>00066 <span class="keyword">public</span>:
<a name="l00068"></a><a class="code" href="a00070.html#a7fbb5a5f14ae118e40d7db1903be6d51">00068</a>   <span class="keyword">static</span> const_simtime_t <a class="code" href="a00070.html#a7fbb5a5f14ae118e40d7db1903be6d51" title="simtime that tells the Phy-Layer not to pass an AirFrame again">notAgain</a>;
<a name="l00070"></a><a class="code" href="a00070.html#a8532046253d31801ffe4bc56b0d70850">00070</a>   <span class="keyword">typedef</span> DeciderToPhyInterface::airframe_ptr_t <a class="code" href="a00070.html#a8532046253d31801ffe4bc56b0d70850">airframe_ptr_t</a>;
<a name="l00071"></a>00071 <span class="keyword">protected</span>:
<a name="l00073"></a><a class="code" href="a00070.html#ac0f72556cb799d883b4219cab58320bb">00073</a>   <a class="code" href="a00079.html" title="This class is the interface for a Decider to the BasePhyLayer.">DeciderToPhyInterface</a>* <span class="keyword">const</span> <a class="code" href="a00070.html#ac0f72556cb799d883b4219cab58320bb" title="A pointer to the physical layer of this Decider.">phy</a>;
<a name="l00074"></a>00074 
<a name="l00076"></a><a class="code" href="a00070.html#a6baab300e0bec90320dfe956c2d15a57">00076</a>   <span class="keyword">typedef</span> <a class="code" href="a00079.html#a13e15d0d80017e55821963b3b4a6cf55" title="Type for container of AirFrames.">DeciderToPhyInterface::AirFrameVector</a> <a class="code" href="a00070.html#a6baab300e0bec90320dfe956c2d15a57" title="Defines what an AirFrameVector shall be here.">AirFrameVector</a>;
<a name="l00077"></a>00077 
<a name="l00082"></a><a class="code" href="a00070.html#a7f3ee545f2ae8b0d8d1814c98917f5b6">00082</a>   <span class="keyword">typedef</span> <a class="code" href="a00079.html#a37995e7f41efc2f95b081653ca01b482" title="Used at initialization to pass the parameters to the AnalogueModel and Decider.">DeciderToPhyInterface::ParameterMap</a> <a class="code" href="a00070.html#a7f3ee545f2ae8b0d8d1814c98917f5b6" title="Used at initialisation to pass the parameters to the AnalogueModel and Decider.">ParameterMap</a>;
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 <span class="keyword">private</span>:
<a name="l00087"></a>00087   <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>(<span class="keyword">const</span> <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>&amp;);
<a name="l00090"></a>00090   <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>&amp;);
<a name="l00091"></a>00091 
<a name="l00092"></a>00092 <span class="keyword">public</span>:
<a name="l00093"></a>00093 
<a name="l00097"></a>00097   <a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>(<a class="code" href="a00079.html" title="This class is the interface for a Decider to the BasePhyLayer.">DeciderToPhyInterface</a>* phy);
<a name="l00098"></a>00098 
<a name="l00107"></a><a class="code" href="a00070.html#ae19a201633e5b2bf2d545921049b4f26">00107</a>   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="a00070.html#ae19a201633e5b2bf2d545921049b4f26" title="Initialize the decider from XML map data.">initFromMap</a>(<span class="keyword">const</span> <a class="code" href="a00070.html#a7f3ee545f2ae8b0d8d1814c98917f5b6" title="Used at initialisation to pass the parameters to the AnalogueModel and Decider.">ParameterMap</a>&amp;) { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00108"></a>00108 
<a name="l00109"></a>00109   <span class="keyword">virtual</span> ~<a class="code" href="a00070.html" title="The basic Decider class.">Decider</a>() {}
<a name="l00110"></a>00110 
<a name="l00115"></a>00115   <span class="keyword">virtual</span> simtime_t processSignal(airframe_ptr_t frame);
<a name="l00116"></a>00116 
<a name="l00119"></a><a class="code" href="a00070.html#ad4d3a23a53e012607b5ce44865857c2b">00119</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00070.html#ad4d3a23a53e012607b5ce44865857c2b" title="Cancels processing a AirFrame.">cancelProcessSignal</a>() {}
<a name="l00120"></a>00120 
<a name="l00128"></a>00128   <span class="keyword">virtual</span> <a class="code" href="a00044.html" title="Provides information about the current state of the channel:">ChannelState</a> getChannelState() <span class="keyword">const</span>;
<a name="l00129"></a>00129 
<a name="l00142"></a>00142   <span class="keyword">virtual</span> simtime_t handleChannelSenseRequest(ChannelSenseRequest* request);
<a name="l00143"></a>00143 
<a name="l00148"></a><a class="code" href="a00070.html#a6e4b28a733a18fddec77bb6a3f179be5">00148</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00070.html#a6e4b28a733a18fddec77bb6a3f179be5" title="Method to be called by an OMNeT-module during its own finish(), to enable a decider to do some things...">finish</a>() {}
<a name="l00149"></a>00149 
<a name="l00160"></a><a class="code" href="a00070.html#ae4da9f61748737c85000dd64e07b66a0">00160</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00070.html#ae4da9f61748737c85000dd64e07b66a0" title="Called by phy layer to indicate that the channel this radio currently listens to has changed...">channelChanged</a>(<span class="keywordtype">int</span> <span class="comment">/*newChannel*/</span>) {}
<a name="l00161"></a>00161 
<a name="l00162"></a>00162 };
<a name="l00163"></a>00163 
<a name="l00164"></a>00164 
<a name="l00165"></a>00165 <span class="preprocessor">#endif </span><span class="comment">/*DECIDER_H_*/</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>Decider.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:29 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
